<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSettingPaysTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('setting_pays', function (Blueprint $table) {
            $table->id();
            $table->integer('setting_id')->unsigned()->comment('系统配置setting表id');
            $table->char('wechat_mch_account',15)->nullable()->comment('微信商户号');
            $table->char('wechat_mch_key',32)->nullable()->comment('微信商户密钥');
            $table->text('wechat_cert')->nullable()->comment('商户支付证书公钥cert加密后的内容');
            $table->text('wechat_key')->nullable()->comment('商户证书私钥key加密后的内容');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('setting_pays');
    }
}
